package com.xumz.dao.impl;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;
import com.xumz.dao.TeacherDao;
import com.xumz.model.Teacher;

@Repository
public class TeacherDaoImpl extends SqlSessionDaoSupport implements TeacherDao {	
	@Override
	public Teacher selectOne(String id) {
		return this.getSqlSession().selectOne(this.getClass().getName() + ".findById",id);
	}

	@Override
	public int insertOne(Teacher teacher) {
		return this.getSqlSession().insert(this.getClass().getName() + ".addOne",teacher);
	}
}
